from django.conf.urls.defaults import *
from django.contrib.auth.models import User

import os

# Uncomment the next two lines to enable the admin:
from django.contrib import admin
admin.autodiscover()


urlpatterns = patterns('',
    # Example:
    # (r'^sirogi/', include('sirogi.foo.urls')),

    # Uncomment the admin/doc line below and add 'django.contrib.admindocs' 
    # to INSTALLED_APPS to enable admin documentation:
    # (r'^admin/doc/', include('django.contrib.admindocs.urls')),

    # Uncomment the next line to enable the admin:
	(r'^admin/(.*)', admin.site.root),
	(r'^.*login/$', 'django.contrib.auth.views.login', {'template_name': 'users/login.html'}),
	(r'^.*logout', 'django.contrib.auth.views.logout', {'template_name': 'users/logged_out.html'}),
	(r'^.*/comments', include('sirogi.comments.urls')),
	(r'^documents/', include('sirogi.documents.urls')),
	(r'^states/', include('sirogi.states.urls')),
	(r'^letter/', include('sirogi.letter.urls')),
	(r'^users/', include('sirogi.users.urls')),
	(r'^approve/', include('sirogi.approve.urls')),
	(r'^main', include('sirogi.main.urls')),
	(r'^site-media/(?P<path>.*)$', 'django.views.static.serve', {'document_root': os.path.join(os.path.dirname(__file__), 'media')}),
	(r'^approved/(?P<path>.*)$', 'django.views.static.serve', {'document_root': os.path.join(os.path.dirname(__file__), 'final_documents')}),
)
